gtkbookmarksmanager: Use GTK+ 3.0's bookmarks file
authorBastien Nocera <hadess@hadess.net>
Thu, 15 Feb 2018 12:29:38 +0000 (13:29 +0100)
committerBastien Nocera <hadess@hadess.net>
Thu, 15 Feb 2018 19:42:21 +0000 (20:42 +0100)
There's no reason to use a separate file until the format of the file
changes though, as this just means that GTK+ 3.x and GTK+ 4.x
applications would end up showing different bookmarks in the file
chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=793425

gtk/gtkbookmarksmanager.c

index f97d5afe986b2381a1eef25a1e6753beee7037b0..31f83fd4dc775d49379dfc8438888b1d7c93b309 100644 (file)
@@ -73,7 +73,11 @@ get_bookmarks_file (void)
   GFile *file;
   gchar *filename;
 
-  filename = g_build_filename (g_get_user_config_dir (), "gtk-4.0", "bookmarks", NULL);
+  /* Use gtk-3.0's bookmarks file as the format didn't change.
+   * Add the 3.0 file format to get_legacy_bookmarks_file() when
+   * the format does change.
+   */
+  filename = g_build_filename (g_get_user_config_dir (), "gtk-3.0", "bookmarks", NULL);
   file = g_file_new_for_path (filename);
   g_free (filename);